var G_TICK = 1500;
var NEXT_TICK = 500;

Array.from(document.querySelectorAll(".job-card-wrapper")).reduce(
  (previous, li) => {
    let BANNERS = [
      "博彦",
      "中软",
      "德科",
      "软通",
      "慧通",
      "鸿合",
      "全品文教",
      "柯莱特",
      "法本",
      "某",
      "易宝",
      "美云",
      "拓保",
      "鲲鹏",
    ];
    let VIEWED = [
      "金山办公软件",
      "某知名",
      "曼迪匹艾",
      "途虎",
      "易碳",
      "佰钧成",
      "开目",
      "天喻",
    ];
    const company = li.querySelector(".company-name").textContent;
    const isBanner = BANNERS.concat(VIEWED).some((item) =>
      company.includes(item)
    );
    const a = li.querySelector(".start-chat-btn");
    if (!isBanner) {
      setTimeout(() => {
        a.click();
        setTimeout(() => {
          document.body.removeChild(
            document.querySelector(".greet-boss-dialog")
          );
        }, NEXT_TICK);
      }, previous);
      return previous + G_TICK;
    } else {
      return previous;
    }
  },
  0
);
